<?php

namespace app\admin\model\prl;

use think\Model;


class Models extends Model
{

    

    // 表名
    protected $table = 'prl_models';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];
    

    public function channels()
    {
        return $this->belongsTo('Channels')->where('id','in',[2,3]);
    }

    public function modelsfields()
    {
        return $this->morphMany('Fields', 'table', 'models');
    }
}
